package com.ssy.lingxi.member.merchant.model.vo.platform.response;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * 返回商城门户注册时需要的信息VO
 * @author whm
 * @version 2.0.0
 * @date 2022-03-17
 **/
public class RoleRuleRegisterVO implements Serializable,Comparable<RoleRuleRegisterVO> {
    private static final long serialVersionUID = 5636987016712526702L;

    /**
     * 会员类型id
     */
    private Long memberTypeId;

    /**
     * 会员类型枚举，标识角色是“企业会员”、“企业个人会员”、“渠道会员”、“渠道个人会员”
     */
    private Integer memberTypeEnum;

    /**
     * 会员类型名称
     */
    private String memberTypeName;

    /**
     * 会员业务类型List
     */
    private List<MemberBusinessVO> businessTypes;

    public Long getMemberTypeId() {
        return memberTypeId;
    }

    public void setMemberTypeId(Long memberTypeId) {
        this.memberTypeId = memberTypeId;
    }

    public Integer getMemberTypeEnum() {
        return memberTypeEnum;
    }

    public void setMemberTypeEnum(Integer memberTypeEnum) {
        this.memberTypeEnum = memberTypeEnum;
    }

    public String getMemberTypeName() {
        return memberTypeName;
    }

    public void setMemberTypeName(String memberTypeName) {
        this.memberTypeName = memberTypeName;
    }

    public List<MemberBusinessVO> getBusinessTypes() {
        return businessTypes;
    }

    public void setBusinessTypes(List<MemberBusinessVO> businessTypes) {
        this.businessTypes = businessTypes;
    }

    public void setMemberBusinessList(List<MemberBusinessVO> businessTypes) {
        this.businessTypes = businessTypes;
    }

    public RoleRuleRegisterVO quickSetMemberBusinessList(List<MemberBusinessVO> memberBusinessList){
        this.setMemberBusinessList(memberBusinessList);
        return this;
    }

    @Override
    public int compareTo(RoleRuleRegisterVO o) {
        return memberTypeId.compareTo(o.getMemberTypeId());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RoleRuleRegisterVO that = (RoleRuleRegisterVO) o;
        return Objects.equals(memberTypeId, that.memberTypeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(memberTypeId);
    }
}
